#include <iostream>
using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    long long m[101] = {0};
    int i, n, j;
    m[0] = 1;
    m[1] = 1;
    m[2] = 2;
    m[3] = 5;
    for (i = 4; i < 101; i++)
    {
        for(j=i-1; j >= 0; j--)
        {
            m[i] += m[j] * m[i-j-1];
        }
    }
    cin >> n;
    while (n--)
    {
        cin >> i;
        cout << m[i] << endl;
    }
}